﻿@using FwProject.Car.Dto
@using FwProject.Core.Car
@model CarInfoDto
@{
    Layout = null;
}
<div class="modal-dialog">
    <div class="modal-content animated fadeIn">
        <form class="form-horizontal" action="/Car/EditCar?id=@Html.ViewContext.RouteData.Values["id"]" method="post" novalidate="novalidate" data-ajax="true" data-ajax-success="ReloadAjaxCallbackgoback" data-ajax-failure="FailureAjaxCallback" data-ajax-method="Post" role="form">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">修改汽车信息</h4>
            </div>
            <div class="modal-body">
                <div class="form-body">
                    @Html.AntiForgeryToken()
                    @Html.TextBoxFor(o => o.FactoryinfoId, new { @class = "hidden" })
                    <div class="form-group">
                        @Html.LabelFor(o => o.EmployeeCarUserId, new { @class = "control-label col-md-3" })
                        <div class="col-md-6">
                            @Html.DropDownListFor(o => o.EmployeeCarUserId, ViewBag.Driver as IEnumerable<SelectListItem>, new { @class = "form-control" })
                            @Html.ValidationMessageFor(o => o.EmployeeCarUserId)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(o => o.PlatesNumber, new { @class = "control-label col-md-3" })
                        <div class="col-md-6">
                            @Html.TextBoxFor(o => o.PlatesNumber, new { @class = "form-control" })
                            @Html.ValidationMessageFor(o => o.PlatesNumber)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(o => o.CarType, new { @class = "control-label col-md-3" })
                        <div class="col-md-6">
                            @*<select class="form-control" asp-items="@Html.GetEnumSelectList(typeof(CarTypeEnum))"></select>*@
                            <enums asp-enum="Model.CarType.GetType()" asp-valuetype="1" asp-name="CarType" asp-id="CarType" asp-value="@((int)Model.CarType)" class="form-control"></enums>
                            @Html.ValidationMessageFor(o => o.CarType)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(o => o.ShoppingTon, new { @class = "control-label col-md-3" })
                        <div class="col-md-6">
                            @Html.TextBoxFor(o => o.ShoppingTon, new { @class = "form-control" })
                            @Html.ValidationMessageFor(o => o.ShoppingTon)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(o => o.Insurance, new { @class = "control-label col-md-3" })
                        <div class="col-md-6">
                            <BoolSelect asp-value="@Model.Insurance" asp-name="Insurance" class="form-control"></BoolSelect>
                            @Html.ValidationMessageFor(o => o.Insurance)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(o => o.CarOld, new { @class = "control-label col-md-3" })
                        <div class="input-group date col-md-6" style="z-index:9999">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            @Html.TextBoxFor(o => o.CarOld, new { @class = "form-control", style = "z-index:9999" })
                            @Html.ValidationMessageFor(o => o.CarOld)
                        </div>
                    </div>

                </div>
            </div>
            <div class="modal-footer">
                <button type="reset" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-primary" data-loading-text="执行中...">保存</button>
            </div>
        </form>
    </div>
    <!-- /.modal-content -->
</div>


